Release 10.1A: OpenEdge Development:
Programming Interfaces


Portability issues

To ensure portability, avoid using the INPUT THROUGH and OUTPUT THROUGH statements. In place of OUTPUT THROUGH, use the OUTPUT TO statement with an escape to the operating system, as shown in the following example:

OUTPUT TO file1.
      .
      .
      .
OUTPUT CLOSE.
CASE OPSYS:
   WHEN "UNIX" OR "Win32" THEN OS-COMMAND program-name < file1.
   OTHERWISE MESSAGE OPSYS "Operating system not supported". 

In this example, you send the data to file1. Then you use the appropriate operating system statement to escape to the operating system. Once at the operating system level, you run the program against the data in file1.

In place of INPUT THROUGH, use an escape to the operating system with the INPUT FROM statement, as shown in the following example:

CASE OPSYS:
   WHEN "UNIX" THEN OS-COMMAND program-name > file1.
INPUT FROM file1.
      .
      .
      .
INPUT CLOSE. 

First, you use the operating system statement to escape to the operating system. Once at the operating system level, you run a program to create the data in file1. Then you use the INPUT FROM statement to retrieve the data in file1.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095